{extend name="$BASE_POPUP" /}
{block name="body"}
<link rel="stylesheet" type="text/css" href="__STATIC__/easyui/themes/custom/easyui.css" />  
<table id="grid-table" class="easyui-datagrid">
    <thead>
        <tr>
            <th data-options="field:'username',width:100, align:'center',sortable:true">用户名称</th>
            <th data-options="field:'content',width:400,align:'center',sortable:true">举报内容</th>
            <th data-options="field:'create_time',width:150,align:'center',sortable:true">举报时间</th>

        </tr>
    </thead>
</table>
{/block}
{block name="script"}           
<script type="text/javascript" src="__STATIC__/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="__STATIC__/easyui/src/datagrid-cellediting.js"></script> 
<script type="text/javascript" src="__STATIC__/easyui/locale/easyui-lang-zh_CN.js"></script> 
<script type="text/javascript">
    var comments_id = "{$comments_id}";
    $(function () {
        $('#grid-table').datagrid({
            url: getURL('loadDetailList', {comments_id: comments_id}),
            method: "GET",
            height: 410,
            rownumbers: true,
            singleSelect: true,
            remoteSort: false,
            multiSort: true,
            emptyMsg: '<span>无相关数据</span>',
            pagination: true,
            pageSize: 20
        });
    });
    function formatEnable(value, row, index) {
        if (value == '1')
            return '<i class="statusEnable icon wb-check"></i>';
        else
            return '<i class="statusDisable icon wb-close"></i>';
    }
    function formatDiscount(value, row, index) {
        if (value == 1) {
            return '<span class="statusDisable">不打则</span>';
        } else {
            var discount;
            if ((value * 100) % 10 == 0)
                discount = (value * 10);
            else
                discount = (value * 100);
            return '<span class="statusEnable">'+discount + ' 折</span>';
        }
    }
    function saveData(callback, layer_index, autoClose) {
        this.close(layer_index);
    }
</script>
{/block}